package com.lyc.business.application.impl.resignationGuidelines;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lyc.business.infrastructure.command.resignationGuidelines.ResignationGuidelinesCommand;
import com.lyc.business.interfaces.facade.resignationGuidelines.ResignationGuidelinesService;
import com.lyc.common.entity.ResignationGuidelinesReq;
import com.lyc.common.entity.ResignationGuidelinesVo;

/**
 * 离职指引业务类
 * @Author 李大神仙
 * @Date 2024/2/23 18:50
 * @Version 1.0
 */
@Service
public class ResignationGuidelinesServiceImpl implements ResignationGuidelinesService {

    @Autowired
    private ResignationGuidelinesCommand resignationGuidelinesCommand;

    @Override
    public IPage<ResignationGuidelinesVo> selectResignationGuidelinesByPage(ResignationGuidelinesReq req) {
        //如果只是简单的判断，不需要处理什么逻辑的话，那么就可以使用断言来判断，如果有判断有逻辑那么就使用if来判断
        //Assert.isFalse(Objects.isNull(req.getPageNum()),"当前页数不能为null");
        return resignationGuidelinesCommand.selectResignationGuidelinesByPage(req);
    }

    @Override
    public void saveOrUpdateResignationGuidelines(ResignationGuidelinesReq req) {

        resignationGuidelinesCommand.saveOrUpdateResignationGuidelines(req);
    }
}
